/**
 * 
 */
package com.jeecms.wicool.entity.shops.base;

import java.io.Serializable;
import java.sql.Timestamp;

import com.jeecms.wicool.entity.shops.Coupon;
import com.jeecms.wicool.entity.shops.ShopInfo;

/**
 * @author spring
 *
 */
public abstract class AbstractRedPacket implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 394971358622779635L;

	private Integer id;
	
	private ShopInfo shop;
	
	private String name;
	
	private Coupon coupon;
	
	private Integer num;
	
	private Timestamp startTime;
	
	private Timestamp endTime;
	
	private Double probability;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public ShopInfo getShop() {
		return shop;
	}

	public void setShop(ShopInfo shop) {
		this.shop = shop;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public Coupon getCoupon() {
		return coupon;
	}

	public void setCoupon(Coupon coupon) {
		this.coupon = coupon;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Timestamp getStartTime() {
		return startTime;
	}

	public void setStartTime(Timestamp startTime) {
		this.startTime = startTime;
	}

	public Timestamp getEndTime() {
		return endTime;
	}

	public void setEndTime(Timestamp endTime) {
		this.endTime = endTime;
	}

	public Double getProbability() {
		return (probability == null ? 0 : probability ) *100;
	}

	public void setProbability(Double probability) {
		probability = (probability == null ? 0 : probability ) / 100;
		this.probability = probability;
	}
	
	
}
